﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WoChu.DeliverCenter.Entity;
using WoChu.Infrastructure.Data;
using WoChu.Infrastructure.Dapper;
using WoChu.Infrastructure.Collection;

namespace WoChu.DeliverCenter.Repository
{
    /// <summary>
    /// 订单主表
    /// </summary>
    public class DeliOrderDetailRepository : RepositoryBase<DeliOrderDetail, string>
    {
        public DeliOrderDetailRepository() : base(ConnectionsDBKey.DeliveryCenter_MS) { }
        public List<DeliOrderDetail> GetCheckOrderDetailList(DeliOrderDetail entity)
        {
            string sql = @"
                    Select OrderNo,GoodsNo,sum(GoodsQty) GoodsQty
                    From Deli_OrderDetail (nolock)                    
                    Where OrderNo=@OrderNo
                    group by OrderNo,GoodsNo
            ";
            var list = Query(sql, entity);
            return list;
        }
    }
}
